package com.amumu.drama.portal.modules.member.mapper;

import com.amumu.drama.common.base.mapstruct.BaseMapping;
import com.amumu.drama.model.UmsMember;
import com.amumu.drama.portal.modules.member.dto.resp.MemberInfoResp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author sunzhuang
 * @date 2024/5/24 11:01
 * @slogan 天下风云出我辈, 一入代码岁月催
 * @desc todo
 */
@Mapper(componentModel = "spring")
public interface MemberInfoRespMapper extends BaseMapping<UmsMember, MemberInfoResp> {
    MemberInfoRespMapper INSTANCE = Mappers.getMapper(MemberInfoRespMapper.class);

    @Override
    default void afterConvertTo(UmsMember src, MemberInfoResp dest) {
        dest.setAvatar(src.getIcon());
    }
}
